import { createRouter, createWebHistory } from 'vue-router';
import FirstPage from '../components/FirstPage.vue';
import Login from '../components/Login.vue';
import Culture from '../components/Culture.vue';
import CultureBack from '../components/CultureBack.vue';
import CultureBackDetail from '../components/CultureBackDetail.vue';
import InstrumentManage from '../components/Instrument.vue';
import InstrumentDetail from '../components/InstrumentDetail.vue';
import Study from '../components/Study.vue';
import Knowledge from '../components/Knowledge.vue';
import KnowledgeDetail from '../components/KnowledgeDetail.vue';
import Notation from '../components/Notation.vue';
import NotationDetail from '../components/NotationDetail.vue';
import MusicLibrary from '../components/MusicLibrary.vue';
import Player from '../components/Player.vue';
import Comment from '../components/Comment.vue';
import MyHome from '../components/MyHome.vue';
import MyCollection from '../components/MyCollection.vue';
import MyFan from '../components/MyFan.vue';
import MyNote from '../components/MyNote.vue';
import MyFocus from '../components/MyFocus.vue';
import Email from '../components/Email.vue';
import EmailDetail from '../components/EmailDetail.vue';
import Note from '../components/Note.vue';
import NoteDetail from '../components/NoteDetail.vue';
import NoteFailed from '../components/NoteFailed.vue';
import NoteLike from '../components/NoteLike.vue';
import HisHome from '../components/HisHome.vue';
import HisNote from '../components/HisNote.vue';
import NoteUpload from '../components/NoteUpload.vue';
import NoteEdit from '../components/NoteEdit.vue';
import PrivateMessage from '../components/PrivateMessage.vue';  
import Register from '../components/Register.vue';  
import MusicCollection from '../components/MusicCollection.vue';
import MyInstruments from '../components/MyInstruments.vue';
import MyCultureBack from '../components/MyCultureBack.vue';
import MyScores from '../components/MyScores.vue';
import MyKnowledge from '../components/MyKnowledge.vue';
import MusicAssistant from '../components/MusicAssistant.vue';


const routes = [
    {
        path: '/',
        name: 'Login',
        component: Login,
        meta: { 
          hideHeader: true,
          hideFooter: true 
        },
      },
    {
        path: '/register',
        name: 'Register',
        component: Register,
        meta: { 
          hideHeader: true,
          hideFooter: true 
        },
    },      
    {
        path: '/FirstPage',
        name: 'FirstPage',
        component: FirstPage,    // 首页
    },
    {  
        path: '/Culture',  
        name: 'Culture',  
        component: Culture, // 文化页面  
    },  
    {  
        path: '/Culture/back',  
        name: 'CultureBack',  
        component: CultureBack, // 文化背景页面  
    },  
    {  
        path: '/Culture/back/:id',  // 动态路由，传递文化背景的ID  
        name: 'CultureBackDetail',  
        component: CultureBackDetail, // 文化背景详情页面  
        props: true, // 传递动态参数  
    },  
    {  
        path: '/MyCultureBack',  
        name: 'MyCultureBack',  
        component: MyCultureBack, // 文化背景收藏页面  
    }, 
    {  
        path: '/instrument',  
        name: 'InstrumentManage',  
        component: InstrumentManage, // 乐器管理页面  
    },  
    {  
        path: '/instrument/:id', // 动态路由，传递乐器ID  
        name: 'InstrumentDetail',  
        component: InstrumentDetail, // 乐器详情页面  
        props: true, // 传递动态参数  
    },
    {  
        path: '/MyInstruments',  
        name: 'MyInstruments',  
        component: MyInstruments, // 乐器收藏页面  
    }, 
    {
        path: '/Study',
        name: 'Study',
        component: Study,    // 学习页面
    },
    {
        path: '/notation',
         name: 'Notation',
         component: Notation,    // 符号页面
     },
     {
        path: '/notation/:id',
       name: 'NotationDetail',
       component: NotationDetail,  // 符号详情页面
       props: true, // 传递动态参数 
    }, 
    {  
        path: '/MyScores',  
        name: 'MyScores',  
        component: MyScores, // 乐谱收藏页面  
    }, 
    {path: '/knowledge',
        name: 'Knowledge',
        component: Knowledge,    // 知识页面
        },
    {
       path: '/knowledge/:id',
       name: 'KnowledgeDetail',
       component: KnowledgeDetail,  // 知识详情页面
       props: true, // 传递动态参数 
    },
    {  
        path: '/MyKnowledge',  
        name: 'MyKnowledge',  
        component: MyKnowledge, // 乐理知识收藏页面  
    }, 
    {
        path: '/MusicLibrary',
        name: 'MusicLibrary',
        component: MusicLibrary,    // 音乐库页面
        children: [
            {
                path: 'Player',
                name: 'Player',
                component: Player  // 播放器页面
            },
           
        ]
    }, 
    {
        path: '/comment',
        name: 'Comment',
        component: Comment  // 评论页面
    } , 
    {
        path: '/Player',
        name: 'Player',
        component: Player  // 播放器页面
    },
    {
        path: '/MusicCollection',
        name: 'MusicCollection',
        component: MusicCollection  // 评论页面
    } , 
    {path: '/knowledge',
    name: 'Knowledge',
    component: Knowledge,    // 知识页面
    },
    {
        path: '/MyHome',
        name: 'MyHome',
        component: MyHome,    // 我的主页
    },
    {
        path: '/my-fan',
        name: 'MyFan',
        component: MyFan  // 我的粉丝页面
    },
    {
        path: '/my-focus',
        name: 'MyFocus',
        component: MyFocus  // 我的关注页面
    },
    {
        path: '/my-collection',
        name: 'MyCollection',
        component: MyCollection  // 我的收藏歌曲页面
    },
    {
        path: '/email',
        name: 'Email',
        component: Email,    // 邮件页面
        children: [
            {
                path: 'detail',
                name: 'EmailDetail',
                component: EmailDetail  // 邮件详情页面
            }
        ]
    },
    {
        path: '/private-message/:user_id/:targetUser_id',
        name: 'PrivateMessage',
        component: PrivateMessage,    // 私信详情页面
    },
    {
        path: '/Note',
        name: 'Note',
        component: Note,    // 笔记页面
        children: [
            {
                path: 'failed',
                name: 'NoteFailed',
                component: NoteFailed  // 笔记失败页面
            },
            {
                path: 'like',
                name: 'NoteLike',
                component: NoteLike  // 笔记点赞页面
            }
        ]
    },
    {
        path: '/HisHome/:user_id',
        name: 'HisHome',
        component: HisHome,    // 他的主页
    },
    {
        path: '/HisNote',
        name: 'HisNote',
        component: HisNote,    // 他的笔记
    },
    {
        path: '/my-note',
        name: 'MyNote',
        component: MyNote  // 我的笔记页面
    },
    {
        path: '/note-upload',
        name: 'NoteUpload',
        component: NoteUpload  // 笔记发布页面
    },
    {
        path: '/note-detail',
        name: 'NoteDetail',
        component: NoteDetail  // 笔记详情页面
    },
    {
        path: '/note-edit',
        name: 'NoteEdit',
        component: NoteEdit  // 笔记详情页面
    },
    {
        path: '/MusicAssistant',
        name: 'MusicAssistant',
        component: MusicAssistant  // 音乐助手
    },

]

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
